<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>参数设置</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		
		<link href="/static/weichat/css/style.css" rel="stylesheet" type="text/css" media="all" />
		<link rel="stylesheet" type="text/css" href="/static/manage/common/bootstrap/js/bootstarp-3.3.7/css/bootstrap.min.css" />
		<script src="/static/manage/common/bootstrap/js/jquery-3.2.0.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/manage/common/bootstrap/js/bootstarp-3.3.7/js/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="/static/manage/common/bootstrap/js/bootstarp-table-1.11.1/bootstrap-table.min.css" />
		<script src="/static/manage/common/bootstrap/js/bootstarp-table-1.11.1/bootstrap-table.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="/static/manage/common/bootstrap/js/bootstarp-table-1.11.1/bootstrap-table-zh-CN.min.js" type="text/javascript" charset="utf-8"></script>
		
	</head>
	<body>
			<form class="form-inline" id="fm1">
      			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="account">预约参数设置</label>
      			<table class="table table-bordered">
 				 		<p align="center">
 				 			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="account">预约定金:</label>
 				 			<input type="text" class="form-control" id="subscribe_deposit" name="subscribe_deposit" value="" style="width:200px;height:30px;">元
 				 		</p>
 				 		<p align="center">
 				 			<label for="account">每2小时可预约上限:</label>
 				 			<input type="text" class="form-control" id="every_two_limit" name="every_two_limit" value="" style="width:200px;height:30px;">个
 				 		</p>
 				 		<p align="center">
 				 			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="account">可取消预定时间:</label>
 				 			<input type="text" class="form-control" id="cancel_time" name="cancel_time" value="" style="width:200px;height:30px;">分
 				 		</p>
 				 		
 				 		<div class="modal-footer">
       						<p align="center"><button type="button" class="btn btn-primary" onclick="up1()">保存</button></p>
      					</div>
				</table>
      		
      			
      		</form>
      		<form class="form-inline" id="fm2">
      			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<label for="account">短信参数</label>
      			<table class="table table-bordered">
 				 		<p align="center">
 				 			<label for="account">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;短信URL地址:</label>
 				 			<input type="text" class="form-control" id="sms_url" name="sms_url" value="" style="width:200px;height:30px;">
 				 		</p>
 				 		<p align="center">
 				 			<label for="account">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;App Key:</label>
 				 			<input type="text" class="form-control" id="sms_app_key" name="sms_app_key" value="" style="width:200px;height:30px;">
 				 		</p>
 				 		<p align="center">
 				 			<label for="account">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;App Secret:</label>
 				 			<input type="text" class="form-control" id="sms_app_secret" name="sms_app_secret" value="" style="width:200px;height:30px;">
 				 		</p>
 				 		<p align="center">
 				 			<label for="account">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;短信签名:</label>
 				 			<input type="text" class="form-control" id="sms_signe" name="sms_signe" value="" style="width:200px;height:30px;"><font color="red" size="2">多个短信签名使用英文分号(,)分割</font>
 				 		</p><p align="center">
 				 			<label for="account">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;短信模板编号:</label>
 				 			<input type="text" class="form-control" id="sms_template_code" name="sms_template_code" value="" style="width:200px;height:30px;"><font color="red" size="2">多个模板编号使用英文分号(,)分割</font>
 				 		</p>
 				 		
 				 		
 				 		<div class="modal-footer">
       						<p align="center"><button type="button" class="btn btn-primary" onclick="up2()">保存</button></p>
      					</div>
				</table>
      		
      			
      		</form>
      		
	</body>
	<script type="text/javascript">
		$(function(){
			$.ajax({
				type:"get",
				url:"/sysparam/allsysparamKey",
				success:function(data){
					console.log("=="+data.subscribe_deposit.param_value);
					$('#subscribe_deposit').val(data.subscribe_deposit.param_value);
					$('#every_two_limit').val(data.every_two_limit.param_value);
					$('#cancel_time').val(data.cancel_time.param_value);
					$('#sms_url').val(data.sms_url.param_value);
					$('#sms_app_key').val(data.sms_app_key.param_value);
					$('#sms_app_secret').val(data.sms_app_secret.param_value);
					$('#sms_signe').val(data.sms_signe.param_value);
					$('#sms_template_code').val(data.sms_template_code.param_value)
				}
			});
		})
		
		//修改1
				function up1(){
					$.ajax({
						type:"post",
						url:"/sysparam/update",
						data:{
							subscribe_deposit:$("#subscribe_deposit").val(),
							every_two_limit:$("#every_two_limit").val(),
							cancel_time:$("#cancel_time").val()
							
							
						},
						success:function(data){
							alert("修改成功")
						}
					})
				}
		//修改2
		function up2(){
			$.ajax({
				type:"post",
				url:"/sysparam/update2",
				data:{
					
					sms_url:$("#sms_url").val(),
					sms_app_key:$("#sms_app_key").val(),
					sms_app_secret:$("#sms_app_secret").val(),
					sms_signe:$("#sms_signe").val(),
					sms_template_code:$("#sms_template_code").val()
					
				},
				success:function(data){
					alert("修改成功")
				}
			})
		}

	</script>
</html>
